(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/house/contract/edit" ], {
    "305b": function(t, n, o) {
        var e = o("4c02");
        o.n(e).a;
    },
    4857: function(t, n, o) {
        o.d(n, "b", function() {
            return e;
        }), o.d(n, "c", function() {
            return i;
        }), o.d(n, "a", function() {});
        var e = function() {
            this.$createElement;
            this._self._c;
        }, i = [];
    },
    "4c02": function(t, n, o) {},
    "57ea": function(t, n, o) {
        o.r(n);
        var e, i = o("4857"), c = o("e70b");
        for (e in c) "default" !== e && function(t) {
            o.d(n, t, function() {
                return c[t];
            });
        }(e);
        o("305b");
        var r = o("f0c5"), i = Object(r.a)(c.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        n.default = i.exports;
    },
    "59cd": function(t, n, e) {
        (function(t) {
            e("767a"), o(e("66fd"));
            var n = o(e("57ea"));
            function o(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = e, t(n.default);
        }).call(this, e("543d").createPage);
    },
    "6d1e": function(t, o, i) {
        (function(e) {
            function n(n, t) {
                var o, e = Object.keys(n);
                return Object.getOwnPropertySymbols && (o = Object.getOwnPropertySymbols(n), t && (o = o.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(n, t).enumerable;
                })), e.push.apply(e, o)), e;
            }
            Object.defineProperty(o, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    return {
                        form: {
                            id: 0,
                            t_name: "",
                            t_tel: "",
                            t_num: "",
                            zj_imgs: []
                        },
                        contract: {}
                    };
                },
                computed: function(e) {
                    for (var t = 1; t < arguments.length; t++) {
                        var i = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? n(Object(i), !0).forEach(function(t) {
                            var n, o;
                            n = e, t = i[o = t], o in n ? Object.defineProperty(n, o, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : n[o] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : n(Object(i)).forEach(function(t) {
                            Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(i, t));
                        });
                    }
                    return e;
                }({}, (o.default = void 0, i("26cb").mapState)({})),
                onLoad: function() {
                    var t = this.$Route.query;
                    this.form.id = t.id, this.init();
                },
                onReady: function() {},
                methods: {
                    init: function() {
                        this.getContract();
                    },
                    getContract: function() {
                        var n = this;
                        this.$api("my.contract_sign", {
                            id: n.form.id
                        }).then(function(t) {
                            0 == t.errno && (t = t.data.contract, n.contract = t, n.form.t_tel = t.t_tel);
                        });
                    },
                    onChooseImg: function(n, t) {
                        var o = this;
                        n.length, o.$tools.chooseImage(t).then(function(t) {
                            t.forEach(function(t) {
                                o.$tools.uploadFile("file.upload", t).then(function(t) {
                                    n.push(t.url);
                                });
                            });
                        });
                    },
                    delImg: function(n, o) {
                        e.showModal({
                            title: "删除照片",
                            content: "确定要删除这张照片么？",
                            cancelText: "取消",
                            confirmText: "删除",
                            success: function(t) {
                                t.confirm && n.splice(o, 1);
                            }
                        });
                    },
                    see: function() {
                        var t = this.form;
                        t.t_name ? t.t_tel ? t.t_num ? 0 != t.zj_imgs.length ? (e.showLoading({
                            title: "正在加载"
                        }), this.$api("my.contract_pre_see2", {
                            contract_id: t.id,
                            t_name: t.t_name,
                            t_num: t.t_num,
                            t_tel: t.t_tel,
                            t_imgs: t.zj_imgs.join(",")
                        }, "post").then(function(t) {
                            0 == t.errno && (t = t.data.url, e.downloadFile({
                                url: t,
                                success: function(t) {
                                    t = t.tempFilePath;
                                    e.openDocument({
                                        filePath: t,
                                        showMenu: !0,
                                        success: function(t) {
                                            console.log("打开成功");
                                        },
                                        fail: function(t) {
                                            console.log(t);
                                        }
                                    });
                                },
                                fail: function(t) {
                                    console.log(t);
                                },
                                complete: function(t) {
                                    e.hideLoading();
                                }
                            }));
                        })) : this.$tools.toast("请上传证件照片") : this.$tools.toast("请填写证件号码") : this.$tools.toast("请填写联系电话") : this.$tools.toast("请填写联系人");
                    },
                    formSubmit: function(t) {
                        var n = this, o = this.form;
                        o.t_name ? o.t_tel ? o.t_num ? 0 != o.zj_imgs.length ? (e.showLoading({
                            mask: !0,
                            title: "正在提交"
                        }), n.$api("my.contract_sign", {
                            id: o.id,
                            t_name: o.t_name,
                            t_num: o.t_num,
                            t_tel: o.t_tel,
                            t_imgs: o.zj_imgs.join(",")
                        }, "post").then(function(t) {
                            e.hideLoading(), 0 == t.errno ? e.showModal({
                                title: "提示",
                                content: "提交成功",
                                showCancel: !1,
                                success: function(t) {
                                    t.confirm && n.$Router.replace({
                                        path: "/pages/house/contract/list"
                                    });
                                }
                            }) : n.$tools.toast("异常");
                        })) : n.$tools.toast("请上传证件照片") : n.$tools.toast("请填写证件号码") : n.$tools.toast("请填写联系电话") : n.$tools.toast("请填写联系人");
                    }
                }
            };
            o.default = t;
        }).call(this, i("543d").default);
    },
    e70b: function(t, n, o) {
        o.r(n);
        var e, i = o("6d1e"), c = o.n(i);
        for (e in i) "default" !== e && function(t) {
            o.d(n, t, function() {
                return i[t];
            });
        }(e);
        n.default = c.a;
    }
}, [ [ "59cd", "common/runtime", "common/vendor" ] ] ]);